package com.ruix.app.model;

import org.json.JSONObject;

/**
 * Created by hadexs on 2017/4/29.
 */

public class FeedbackAdvice {
    private String content;
    private long createdTime;
    private String classId;
    private String authorId;
    private String authorName;
    private String authorAvatar;

    public FeedbackAdvice parse(JSONObject object){
        if (object != null) {
            setContent(object.optString("content", ""));
            long time = object.optLong("created_at", 0) * 1000;
            setCreatedTime(time);
            setClassId(object.optString("cid", ""));
            setAuthorId(object.optString("author_id", ""));
            setAuthorName(object.optString("author_name", ""));
            setAuthorAvatar(object.optString("author_avatar", ""));
        }
        return this;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public long getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(long createdTime) {
        this.createdTime = createdTime;
    }

    public String getClassId() {
        return classId;
    }

    public void setClassId(String classId) {
        this.classId = classId;
    }

    public String getAuthorId() {
        return authorId;
    }

    public void setAuthorId(String authorId) {
        this.authorId = authorId;
    }

    public String getAuthorName() {
        return authorName;
    }

    public void setAuthorName(String authorName) {
        this.authorName = authorName;
    }

    public String getAuthorAvatar() {
        return authorAvatar;
    }

    public void setAuthorAvatar(String authorAvatar) {
        this.authorAvatar = authorAvatar;
    }


}
